package com.spic.business.alarm.service.impl;

import com.spic.business.alarm.domain.AlarmDevice;
import com.spic.business.alarm.mapper.AlarmDeviceMapper;
import com.spic.business.alarm.service.IAlarmDeviceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 告警桩Service业务层处理
 *
 * @author spic
 * @date 2022-07-01
 */
@Service
public class AlarmDeviceServiceImpl implements IAlarmDeviceService
{
    @Autowired
    private AlarmDeviceMapper alarmDeviceMapper;

    /**
     * 查询告警桩
     *
     * @param id 告警桩主键
     * @return 告警桩
     */
    @Override
    public AlarmDevice selectAlarmDeviceById(Long id)
    {
        return alarmDeviceMapper.selectAlarmDeviceById(id);
    }

    /**
     * 查询告警桩列表
     *
     * @param alarmDevice 告警桩
     * @return 告警桩
     */
    @Override
    public List<AlarmDevice> selectAlarmDeviceList(AlarmDevice alarmDevice)
    {
        return alarmDeviceMapper.selectAlarmDeviceList(alarmDevice);
    }

    /**
     * 新增告警桩
     *
     * @param alarmDevice 告警桩
     * @return 结果
     */
    @Override
    public int insertAlarmDevice(AlarmDevice alarmDevice)
    {
        return alarmDeviceMapper.insertAlarmDevice(alarmDevice);
    }

    /**
     * 修改告警桩
     *
     * @param alarmDevice 告警桩
     * @return 结果
     */
    @Override
    public int updateAlarmDevice(AlarmDevice alarmDevice)
    {
        return alarmDeviceMapper.updateAlarmDevice(alarmDevice);
    }

    /**
     * 批量删除告警桩
     *
     * @param ids 需要删除的告警桩主键
     * @return 结果
     */
    @Override
    public int deleteAlarmDeviceByIds(Long[] ids)
    {
        return alarmDeviceMapper.deleteAlarmDeviceByIds(ids);
    }

    /**
     * 删除告警桩信息
     *
     * @param id 告警桩主键
     * @return 结果
     */
    @Override
    public int deleteAlarmDeviceById(Long id)
    {
        return alarmDeviceMapper.deleteAlarmDeviceById(id);
    }
}
